{% comment %}

 Copyright 2013 - Tom Alessi

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and 
 limitations under the License.

{% endcomment %}

<!DOCTYPE html>
<!--[if IE 8]>         <html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->


<head>
<title>Quinico | {{title}}</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" /> 


<!-- Set the viewport for mobile optimization -->
<meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width">

<link rel="stylesheet" href="/html/css/foundation.css" />
<link rel="stylesheet" href="/html/css/normalize.css" />
<link type="text/css" href="/html/css/ui-lightness/jquery-ui-1.10.3.custom.css" rel="stylesheet" />
<link rel="stylesheet" media="screen"  href="/html/css/responsive-tables.css" />
<link rel="StyleSheet" href="/html/css/app.css">

<script type="text/javascript" src="/html/js/vendor/custom.modernizr.js"></script>
<script type="text/javascript" src="/html/js/jquery-1.9.1.js"></script>
<script type="text/javascript" src="/html/js/jquery-ui-1.10.3.custom.js"></script>
<script type="text/javascript" src="/html/js/responsive-tables.js"></script>
<script type="text/javascript" src="/html/js/jquery.tablesorter.min.js"></script> 
<script type="text/javascript" src="/html/js/quinico.js"></script>

</head>

<body>

{% if alert %}
  <div class="alert">{{alert|safe}}</div>
{% endif %}

<a href="/" {% if app_version %}title="v-{{app_version}}"{% endif %}><img src="/html/images/logo.png"></a>

<div>
  <span style="float:right">
    {% if user.is_authenticated %}
      <a class="nu" href="/accounts/logout">Logout</a>
         ({{user.username}})&nbsp;&nbsp;
    {% else %}
      <a class="nu" href="/accounts/login">Login</a>&nbsp;&nbsp;
    {% endif %}
  </span>
</div>
<div class="spacer_small"></div>

<nav class="top-bar">
  <ul class="title-area">
    <li class="name"></li>
    <!-- Remove the class "menu-icon" to get rid of menu icon. Take out "Menu" to just have icon alone -->
    <li class="toggle-topbar menu-icon"><a href="#"><span>Menu</span></a></li>
  </ul>

  <section class="top-bar-section">
    <!-- Left Nav Section -->
    <ul class="left">
      
      <li class="divider"></li>
      <li ><a href="/">Home</a></li>

      <li class="divider"></li>
      <li ><a href="http://www.quinico.com">Documentation</a></li>

      <li class="divider"></li>
      <li class="has-dropdown"><a href="#">Dashboard</a>
        <ul class="dropdown">
          <li><a href="/dashboard/admin">Admin</a></li>
          <li><a href="/dashboard/">Launch</a></li>
        </ul>
      </li>

      <li class="divider"></li>
      <li class="has-dropdown"><a href="#">Reports</a>
        <ul class="dropdown">
          <li class="has-dropdown"><a href="#">API Status</a>
            <ul class="dropdown">
              <li><a href="/status/api">API Counts</a></li>
            </ul>
          </li>
          
          {% if not reports.disable_webmaster %}
          <li class="has-dropdown"><a href="#">Webmaster</a>
            <ul class="dropdown">
              <li><a href="/webmaster/all">Crawl Error - All</a></li>
              <li><a href="/webmaster/total">Crawl Error - Domain Total</a></li>
              <li><a href="/webmaster/trends">Crawl Error - Individual Trends</a></li>
              <li><a href="/webmaster/summary">Crawl Error - Daily Summary</a></li>
              <li><a href="/webmaster/queries">Top Search Queries</a></li>
              <li><a href="/webmaster/messages">Webmaster Messages</a></li>
            </ul>
          </li>
          {% endif %}
          
          {% if not reports.disable_keyword_rank %}
          <li class="has-dropdown"><a href="#">Keywords</a>
            <ul class="dropdown">
              <li><a href="/keyword_rank/dashboard">Dashboard</a></li>
              <li><a href="/keyword_rank/trends">Trends</a></li>
            </ul>
          </li>
          {% endif %}

          {% if not reports.seomoz %}
          <li class="has-dropdown"><a href="#">SEO</a>
            <ul class="dropdown">
              <li><a href="/seomoz/dashboard">Dashboard</a></li>
              <li><a href="/seomoz/trends">Trends</a></li>
            </ul>
          </li>
          {% endif %}

          <li class="has-dropdown"><a href="#">Web Page</a>
            <ul class="dropdown">
              {% if not reports.disable_pagespeed %}
              <li class="has-dropdown"><a href="#">Optimization</a>
                <ul class="dropdown">
                  <li><a href="/pagespeed/trends">Trends</a></li>
                  <li><a href="/pagespeed/history">History</a></li>
                  <li><a href="/pagespeed/breakdown">Breakdown</a></li>
                </ul>
              <li>
              {% endif %}

              {% if not reports.disable_webpagetest %}
              <li class="has-dropdown"><a href="#">Performance</a>
                <ul class="dropdown">
                  <li><a href="/webpagetest/trends">Trends</a></li>
                  <li><a href="/webpagetest/history">History</a></li>
                </ul>
              <li>
              {% endif %}
            </ul>
          </li>
        </ul>
      </li>

      {% if user.is_authenticated %}
      <li class="divider"></li>
      <li class="has-dropdown"><a href="#">Admin</a>
        <ul class="dropdown">
          <li><a href="/admin">DJango Admin</a></li>
        </ul>
      </li>
      {% endif %}

      <li class="divider"></li>
    </ul>
    


    <!-- Title Area -->
    <ul>
     <li class="name hide-for-small">
      <a href="#"><i>{ {{title}} }</i></a>
     </li>
    </ul>

  </section>
</nav>

<div class="row left">
  <div class="large-12 large-centered columns">
    <div id="help" class="help" style="display:none;">{% autoescape off %}{{help_blurb}}{% endautoescape %}</div>
  </div>
</div>

<div class="row left">
  <div class="large-6 columns">
    &nbsp;

    {% if back_link %}
    <a class="nav" href="{{back_link}}">&laquo; older</a>
    {% endif %}

    {% if forward_link %}
    <a class="nav" href="{{forward_link}}">newer &raquo;</a>
    {% endif %}

    {% if help_blurb %}
    <img height="25" width="25" src="/html/images/info.jpg" title="Help" onclick="hide_show('help')">
    {% endif %}

    {% if csv_link %}
    <a href="{{csv_link}}"><img height="25" width="25" src="/html/images/csv.jpg" title="Raw Data Download: Download Data in CSV format."></a>
    {% endif %}

    {% if json_link %}
    <a href="{{json_link}}"><img height="25" width="25" src="/html/images/json-logo.jpg" title="Monitoring Link: Use this link with your favorite monitoring application (i.e. Nagios and the Quinico plugin) to receive real-time alerts on performance of your key metrics."></a>
    {% endif %}

    {% if json_link1 %}
    <a href="{{json_link1}}"><img height="25" width="25" src="/html/images/json-logo.jpg" title="Monitoring Link: Use this link with your favorite monitoring application (i.e. Nagios and the Quinico plugin) to receive real-time alerts on performance of your key metrics."></a>
    {% endif %}

    {% if json_link2 %}
    <a href="{{json_link2}}"><img height="25" width="25" src="/html/images/json-logo.jpg" title="Monitoring Link: Use this link with your favorite monitoring application (i.e. Nagios and the Quinico plugin) to receive real-time alerts on performance of your key metrics."></a>
    {% endif %}

    {% if db_link %}
    <a href="{{db_link}}"><img height="25" width="25" src="/html/images/db.png" title="Dashboard Link: Paste this link directly into the Quinico dashboard application to customize your dashboard view to only the data you are interested in."></a>
    {% endif %}

    {% if db_link1 %}
    <a href="{{db_link1}}"><img height="25" width="25" src="/html/images/db.png" title="Dashboard Link: Paste this link directly into the Quinico dashboard application to customize your dashboard view to only the data you are interested in."></a>
    {% endif %}

    {% if db_link2 %}
    <a href="{{db_link2}}"><img height="25" width="25" src="/html/images/db.png" title="Dashboard Link: Paste this link directly into the Quinico dashboard application to customize your dashboard view to only the data you are interested in."></a>
    {% endif %}

  </div>
</div>

<div class="spacer_medium"></div>
    
<div class="row left">
  <div class="large-12 large-centered columns">
  {% block content %}

  {% endblock %}
  </div>
</div>

<script>
  document.write('<script src=' +
  ('__proto__' in {} ? '/html/js/vendor/zepto' : '/html/js/vendor/jquery') +
  '.js><\/script>')
  </script>
  <script src="/html/js/foundation/foundation.js"></script>
  <script src="/html/js/foundation/foundation.alerts.js"></script>
  <script src="/html/js/foundation/foundation.clearing.js"></script>
  <script src="/html/js/foundation/foundation.cookie.js"></script>
  <script src="/html/js/foundation/foundation.dropdown.js"></script>
  <script src="/html/js/foundation/foundation.forms.js"></script>
  <script src="/html/js/foundation/foundation.joyride.js"></script>
  <script src="/html/js/foundation/foundation.magellan.js"></script>
  <script src="/html/js/foundation/foundation.orbit.js"></script>
  <script src="/html/js/foundation/foundation.placeholder.js"></script>
  <script src="/html/js/foundation/foundation.reveal.js"></script>
  <script src="/html/js/foundation/foundation.section.js"></script>
  <script src="/html/js/foundation/foundation.tooltips.js"></script>
  <script src="/html/js/foundation/foundation.topbar.js"></script>
  <script>
  $(document).foundation();
</script>

</body>
</html>
